import api from "./index";

export function uploadFile(file, sourceType) {
    let formData = new FormData()
    formData.append('file', file)
    return api.post('/home/uploadImageOss', formData, { headers: { "Content-Type": "multipart/form-data" }})
}

//加载用户信息
export function loadCustom(formData) {
    return api.post('/custom/load', formData, { headers: { "Content-Type": "application/x-www-form-urlencoded" }})
}

//编辑资料
export function editCustomInformation(formData) {
    return api.post('/custom-information/edit', formData, { headers: { "Content-Type": "application/x-www-form-urlencoded" }})
}

//加载资料
export function loadCustomInformationList(formData) {
    return api.post('/custom-information/list', formData, { headers: { "Content-Type": "application/x-www-form-urlencoded" }})
}

//删除资料
export function deleteCustomInformation(formData) {
    return api.post('/custom-information/delete', formData, { headers: { "Content-Type": "application/x-www-form-urlencoded" }})
}